from django.shortcuts import render

# Create your views here.
from django.http import HttpResponse
from django.shortcuts import render
# import mysql.connector


def hello(request):
    context = {}
    # mysqlConnector = mysql.connector.connect(user="root", password="root", host="localhost", database="springtest")
    # cur = mysqlConnector.cursor()
    # cur.execute("select * from product")
    context['hello'] = 'Hello 你好!'
    # for content in cur:
    #     context['database'] = content;
    return render(request, 'hello.html', context)


def index(request):
    context = {}
    context['nihao'] = "hahaha"
    return render(request, "test/index.html", context)
